package com.regan.erp.service;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.plugin.activerecord.SqlPara;
import com.regan.erp.model.Dict;

/**
 * 字典服务
 *
 * @author zhangby
 * @date 2018/10/15 下午5:26
 */
public class DictService {

    /**
     * 获取字典列表数据
     *
     * @param paramDict
     * @return
     * @author zhangby
     * @date 2018/10/15 下午5:27
     */
    public Page<Dict> getDictListData(cn.hutool.core.lang.Dict paramDict) {
        SqlPara sqlPara = Db.getSqlPara("dict.getDictListData", paramDict);
        Page<Dict> paginate = Dict.dao.paginate(paramDict.getInt("pageNum"), paramDict.getInt("pageSize"), sqlPara);
        return paginate;
    }
}
